//
//  CollectionViewCell.m
//  FuncFanc
//
//  Created by hubing on 2018/3/5.
//  Copyright © 2018年 huhu. All rights reserved.
//

#import "CollectionViewCell.h"
@interface CollectionViewCell ()

@end
@implementation CollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(void)configPicCellWithData:(NSDictionary *)dict{
    
    [_image sd_setImageWithURL:[NSURL URLWithString:dict[@"img"]?dict[@"img"]:dict[@"cover"]] placeholderImage:[UIImage imageNamed:@"friendstatebg"]];
    if (dict[@"cover"]) {
        NSLog(@"%@",dict[@"setname"]);
        NSLog(@"%@",dict[@"desc"]);
    }else{
        NSLog(@"花瓣相册");
    }
    
    
    
//    [_image sd_setImageWithPreviousCachedImageWithURL:[NSURL URLWithString:dict[@"img"]] placeholderImage:[UIImage imageNamed:@"friendstatebg"] options:SDWebImageRetryFailed progress:^(NSInteger receivedSize, NSInteger expectedSize) {
//
//        NSLog(@"%ld,%ld",(long)receivedSize,(long)expectedSize);
//
//    } completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
////        CGSize newSize;
////        CGImageRef imageRef =nil;
////        CGFloat scale = image.size.width/image.size.height;
////        imageRef =  CGImageCreateWithImageInRect([image CGImage], CGRectMake(0, 0, ScreenWidth, ScreenWidth/scale));
////        _image.image =[UIImage imageWithCGImage:imageRef];
//    }];
    
    
    
 //  _title.text = dict[@"title"];
 //  _desc.text = dict[@"desc"];
 //  _like.text = [NSString stringWithFormat:@"%@",dict[@"like"]];
  //  _repin.text = [NSString stringWithFormat:@"%@",dict[@"repin_count"]];
}



@end
